#!/bin/bash

echo -e "\e[1;32m正在关闭网络 \e[0m"
cd "test-network"
./network.sh down
echo -e "\e[1;32m网络  关闭完成\e[0m"
cd ..
# read

echo -e "\e[1;33m正在启动网络 \e[0m"
cd "test-network"
./network.sh up -ca
echo -e "\e[1;33m网络  启动完成\e[0m"
sleep 1
cd ..
# read

echo -e "\e[1;34m正在创建通道 \e[0m"
cd "test-network"
./network.sh createChannel -c mychannel -ca
echo -e "\e[1;34m通道  创建完成\e[0m"
sleep 2
cd ..
# read

echo -e "\e[1;35m正在部署链码 \e[0m"
cd "test-network"
./network.sh deployCC -ccn basic-token -ccp ../asset-transfer/chaincode-go -ccl go
./network.sh deployCC -ccn evidence_chaincode -ccp ../evidence-persistance/chaincode-go-evidence -ccl go
echo -e "\e[1;35m链码  部署完成\e[0m"
# sleep 2
cd ..
# read

